package org.example.gift.exception;

import org.example.gift.enums.SystemErrorCode;

public class BusinessException extends RuntimeException{

    private SystemErrorCode systemErrorCode;

    public BusinessException() {
        super();
    }

    public BusinessException(String msg) {
        super(msg);
    }
    public BusinessException(SystemErrorCode systemErrorCode) {
        super(systemErrorCode.getMsg());
        this.systemErrorCode=systemErrorCode;
    }

    public SystemErrorCode getSystemErrorCode() {
        return systemErrorCode;
    }

    public void setSystemErrorCode(SystemErrorCode systemErrorCode) {
        this.systemErrorCode = systemErrorCode;
    }
}